import React, { useState, useEffect } from "react";
import { connect } from 'umi';
import Select from '@/components/FormCondition/Select';
import {InputNumber,Radio, Row, Col, Space, Button, Spin, Form } from 'antd';
const ExamYearCondition = (props) => {
  const { data ,onChange} = props
  const { examYears = '', amount = '1', conditionType = 'all' } = data
  useEffect(() => {
  }, [])
  const selectList = [
    { name: '毕业年份条件', value: 'examYears', disabled: true },
    { name: '标签权限', value: 'tagIds', disabled: true },
    { name: '商品权限', value: 'goodsIds', disabled: true },
    { name: '阶段权限', value: 'stages', disabled: true },
    { name: '意向方向条件', value: ' intentionDirectionIds', disabled: true }
  ]

  return <Row>
        <Col span={4}>
          <Select
             disabled={true}
            value={'examYears'}
            placeholder="请选择类型"
            select={selectList}
          ></Select>
        </Col>
        <Col span={4}>
          <Select
            disabled={true}
            value={conditionType}
            select={[
              { name: '全部', value: 'all' },
              { name: '任意', value: 'any' },
            ]}
          ></Select>
        </Col>
        <Col span={4}>
          <InputNumber
            disabled={true}
            style={{ width: '100%' }}
            value={amount}
            placeholder="请输入数量"
          ></InputNumber>
        </Col>
        <Col span={12}>
          <Select
            mode='multiple'
            placeholder="请选择毕业年份"
            select={{
              2023: 2023,
              2024: 2024,
              2025: 2025,
              2026: 2026,
              2027: 2027,
              2028: 2028,
            }}
            onChange={(e)=>{onChange({examYears:e.toString()})}}
            value={examYears.split(',').filter(item =>{return item})}
          ></Select>
        </Col>
  </Row>
}
export default connect(({ loading }) => ({
  loading: loading.effects['liveStreaming/fetchLiveData']
}))(ExamYearCondition);;
